package com.tsj.spzx.order.feign;

import com.tsj.spzx.model.entity.order.OrderInfo;
import com.tsj.spzx.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("service-order")
public interface OrderFeignClient {

    /**
     * 根据订单号查询订单信息
     * @param orderNo
     * @return
     */
    @GetMapping("/api/order/orderInfo/auth/getOrderInfo/{orderNo}")
    public OrderInfo getOrderInfoByOrderNo(@PathVariable("orderNo") String orderNo);


    /**
     * 支付成功后，修改订单状态
     * @param orderNo
     * @return
     */
    @GetMapping("/api/order/orderInfo/auth/updateOrderInfoStatusPayed/{orderNo}")
    public Result updateOrderInfoStatusPayed(@PathVariable("orderNo") String orderNo);

}
